package cn.hjh.dao.Impl;

import cn.hjh.dao.BaseDao;
import cn.hjh.dao.UsersDao;
import cn.hjh.pojo.Users;
import org.springframework.stereotype.Repository;

@Repository
public class UserDaoImpl extends BaseDao implements UsersDao {


    //注册
    @Override
    public void insert(Users users) {
        currentSession().save(users);
    }

    @Override
    public Users denglu(String name) {
        return (Users) currentSession().createQuery("from users where name = ?").setParameter(0,name).uniqueResult();
    }
}
